package com.zeei.ems.base.security.respone;

import lombok.ToString;


@ToString
public enum CommonCode implements ResultCode {

    SUCCESS(true, 1000, "操作成功！"),
    FAIL(false, 11111, "操作失败！"),
    AUTH_FAILED(false, 99997, "用户名或密码错误！"),
    UNAUTHORISE(false, 10002, "权限不足，无权操作！"),
    UNAUTHENTICATED(false, 10001, "此操作需要登陆系统！");

    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;

    private CommonCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    public boolean success() {
        return success;
    }

    public int code() {
        return code;
    }

    public String message() {
        return message;
    }
}
